package lambda.function;

import java.util.function.Predicate;

public class PredicateTest {
    public static void main(String[] args) {
        Predicate isNull = (s) -> null == s || "".equals(s);
        String a = "abc";
        String b = null;
        Predicate notNull = isNull.negate();
        System.out.println(isNull.test(a));
        System.out.println(isNull.test(b));
        System.out.println(notNull.test(a));
        System.out.println(notNull.test(b));
    }
}
